def parrot_trouble(a, b):
    if 0 < b < 7 and a is True:
        return True
    elif 20 < b <= 23 and a is True:
        return True
    else:
        return False